<?PHP
  $current_page = "reset_password_respnose.php";
  $page_type = "A";
  require_once 'header.php';
  
  $user_id = $_POST["user_id"];
  $password = $_POST["password"];

  // Update account with the default password
  $sql = "update USER_ACCT set Password='$password' where UserId='$user_id'";

  $result_array = execute_sql_in_oracle($sql);
  $result = $result_array["flag"];
  $cursor = $result_array["cursor"];

  if (!$result){
    $reset_error = 'User account('."<b><font color=\"black\">".$user_id."</font></b>".') password reset failed!';
    header("Location:user.php?reset_error=$reset_error");
  }
  else {
    // Record updated with default password
    $reset_success = 'User account('."<b><font color=\"black\">".$user_id."</font></b>".') password reset successfully!';
    header("Location:user.php?reset_success=$reset_success");
  }
?>